package fem2;

import org.junit.Test;

import fem2.element.MatlabBBarStructuralElement;
import fem2.enu.State;
import fem2.material.StVenantKirchhoffMM;

public class MatlabTest {

	public Model createModel() {
		Mesh mesh = new PatchTestT3(0).createMesh();

		Model m = new Model(mesh);
		MaterialModel mm = new StVenantKirchhoffMM(0, 0, 1.0, 0.0, State.PLANE_STRESS);
		for (int i = 0; i < mesh.countFaces(); i++) {
			Element e;
			e = new MatlabBBarStructuralElement(mesh.getFace(i));
			((MatlabBBarStructuralElement) e).setMaterialModel(mm);
			m.addElement(e);
		}

		return m;
	}

	@Test
	public void test() {
		Model M = createModel();
		M.Initialize();
	}
}
